package com.eling.elcms.travel.service.impl;

import com.eling.elcms.core.service.impl.GenericManagerImpl;
import com.eling.elcms.ordermanager.model.ServicePoint;
import com.eling.elcms.travel.dao.IRoomStatisticsDao;
import com.eling.elcms.travel.model.view.*;
import com.eling.elcms.travel.service.IRoomStatisticsManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class RoomStatisticsManagerImpl extends GenericManagerImpl<ServicePoint, Long>implements IRoomStatisticsManager {

	IRoomStatisticsDao roomStatisticsDao;

	@Autowired
	public void setiRoomStatisticsDao(IRoomStatisticsDao roomStatisticsDao) {
		this.dao = roomStatisticsDao;
		this.roomStatisticsDao = roomStatisticsDao;
	}

	@Override
	public List<RoomStatisticsView> queryAllByDate(Date startDate,Date endDate,ServicePoint servicePoint) {
		return roomStatisticsDao.queryAllByDate(startDate,endDate,servicePoint);
	}

	@Override
	public List<IncomingByRoomTypeView> queryByRoomType(Date startDate, Date endDate) {
		return roomStatisticsDao.queryByRoomType(startDate,endDate);
	}

	@Override
	public List<IncomingDetailsView> queryByRoomTypeDetailes(String checkinType,Date startDate, Date endDate) {
		return roomStatisticsDao.queryByRoomTypeDetails(checkinType,startDate,endDate);
	}

	@Override
	public List<IncomingStatisticsView> queryByType(Date startDate, Date endDate) {
		return roomStatisticsDao.queryByType(startDate,endDate);
	}

	@Override
	public List<IncomingTypeDetailsView> queryByTypeDetails(Date startDate, Date endDate, Long pkRoomType) {
		
		return roomStatisticsDao.queryByTypeDetails(startDate,endDate,pkRoomType);
	}

	@Override
	public List<OrderRoomView> queryOrderRoom() {
		return roomStatisticsDao.queryOrderRoom();
	}
	
	
}
